<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>创建线索池</title>
    <link rel="icon" href="favicon.ico" type="images/ico">
    <meta name="author" content="dc">
    <link href="/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="/css/materialdesignicons.min.css" rel="stylesheet"/>
    <link href="/css/animate.min.css" rel="stylesheet"/>
    <link href="/css/style.min.css" rel="stylesheet"/>
    <link href="/js/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/js/jquery-confirm/jquery-confirm.min.css"/>
    <!--时间选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css">
    <!--日期选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datepicker/bootstrap-datepicker3.min.css">
    <link rel="stylesheet" href="/css/input_tags.css"/>
    <!-- 多选下拉 -->
    <link rel="stylesheet" href="/css/bootstrap-multiselect.css" type="text/css"/>
    <link rel="stylesheet" href="/css/bootstrap-select.css" type="text/css"/>
    <link rel="stylesheet" href="/css/skin.css"/>
    <link rel="stylesheet" href="/css/cluePoolManager/addCluePool.css"/>

</head>
<body>
<div class="container-fluid">
    <div class="card addCluePoll">
        <div class="card-header">
            <h1>创建线索池</h1>
        </div>
        <form class="card-body" autocomplete="off">
            <div class="well form-well">
                <div class="row">
                    <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label label-required" for="cluePoolName">线索池名称</label>
                        <div class="form-content">
                            <input type="text" id="cluePoolName" class="form-control" placeholder="线索池名称" maxlength="20">
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label label-required" for="source">来源</label>
                        <div class="form-content">
                            <input type="text" id="source" class="form-control" placeholder="请输入来源">
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label label-required">所在地区</label>
                        <div class="form-content content-2 clearfix">
                            <select onchange="changeCity()" id="province" name="province" type="text" title="请选择" data-live-search="false"></select>
                            <select id="city" name="city" type="text" title="请选择" data-live-search="false"></select>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label label-required" for="industry">所在行业</label>
                        <div class="form-content">
                            <select class="form-control" id="industry" type="text" title="请选择" data-live-search="true">
                                <option value="1">农、林、牧、渔业</option>
                                <option value="2">采矿业</option>
                                <option value="3">制造业</option>
                                <option value="4">电力、热力、燃气及水生产和供应业</option>
                                <option value="5">建筑业</option>
                                <option value="6">批发和零售业</option>
                                <option value="7">交通运输、仓储和邮政业</option>
                                <option value="8">住宿和餐饮业</option>
                                <option value="9">信息传输、软件和信息技术服务业</option>
                                <option value="10">金融业</option>
                                <option value="11">房地产业</option>
                                <option value="12">租赁和商务服务业</option>
                                <option value="13">科学研究和技术服务业</option>
                                <option value="14">水利、环境和公共设施管理业</option>
                                <option value="15">居民服务、修理和其他服务业</option>
                                <option value="16">教育</option>
                                <option value="17">卫生和社会工作</option>
                                <option value="18">文化、体育和娱乐业</option>
                                <option value="19">公共管理、社会保障和社会组织</option>
                                <option value="20">国际组织</option>
                                <option value="21">其他</option>
                            </select>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label label-required">有效时间</label>
                        <div class="form-content input-group">
                            <input type="text" id="effectiveTime" class="form-control" placeholder="请输入有效时间">
                            <span class="input-group-addon">
                                <label class="lyear-checkbox checkbox-inline checkbox-primary"><input type="checkbox" value="0" id="yongJiu" onchange="yongjiu()"><span>永久有效</span></label>
                            </span>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label label-required">线索池类型</label>
                        <div class="form-content">
                            <select class="form-control" id="poolType" type="text" title="请选择" data-live-search="false">
                                <option value="1">优</option>
                                <option value="2">良</option>
                                <option value="3">一般</option>
                            </select>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label label-required" for="capacity">线索池容量</label>
                        <div class="form-content input-group">
                            <input type="text" id="capacity" class="form-control" placeholder="请输入线索池容量" oninput="value=value.replace(/[^\d]/g,'')" maxlength="10">
                            <span class="input-group-addon">条</span>
                        </div>
                    </div>
                    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                        <label class="control-label label-required">标签</label>
                        <div class="form-content">
<!--                            <div class="tags-box form-control">-->
<!--                                <input type="text" name="staticPath" value="" id="staticPath2"/>-->
<!--                            </div>-->
                            <div style="width:100%;">
                                <!--                                            <input type="text" name="staticPath" value="" id="staticPath2"/>-->
                                <input type="text" data-role="tagsinput" value="" placeholder="输入标签，回车确认" class="form-control tagsinput" >
                            </div>
                        </div>
                    </div>

                </div>
                <div class="row">
                    <div class="col-xs-12">
                        <label class="control-label label-required">线索池性质</label>
                        <div class="form-content">
                            <label class="lyear-radio radio-inline radio-primary m-t-10">
                                <input type="radio" value="1" name="nature" onclick="seleceChi(1)">
                                <span>私有池</span>
                            </label>
                            <label class="lyear-radio radio-inline radio-primary m-t-10">
                                <input type="radio" value="3" name="nature" onclick="seleceChi(3)">
                                <span>全国公有池</span>
                            </label>
                            <label class="lyear-radio radio-inline radio-primary m-t-10">
                                <input type="radio" value="2" name="nature" onclick="seleceChi(2)">
                                <span>分公司公有池</span>
                            </label>
<!--                            <div id="search"></div>-->
                            <div class="branch-select" style="display: none;">
                                <select multiple="multiple" id="companySelection"></select>
                            </div>
                            <!--<select class="form-control" id="allCompany" multiple></select>-->
                            <!--<select multiple="" data-live-search="true" data-live-search-placeholder="Search" data-actions-box="true">
                                <option value="abc">abc</option>
                                <option value="abc">abc</option>
                                <option value="abc">abc</option>
                                <option value="abc">abc</option>
                            </select>-->
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xs-12">
                        <label class="control-label">线索转换方式</label>
                        <div class="form-content">
                            <label class="lyear-radio radio-inline radio-primary m-t-10">
                                <input type="radio" value="1" name="conversionMethod" checked>
                                <span>自我转换</span>
                            </label>
                            <label class="lyear-radio radio-inline radio-primary m-t-10">
                                <input type="radio" value="2" name="conversionMethod">
                                <span>客服转换</span>
                            </label>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xs-12">
                        <label class="control-label">分配方式</label>
                        <div class="form-content">
                            <label class="lyear-radio radio-inline radio-primary m-t-10">
                                <input type="radio" value="0" name="allocation" onchange="changeWay(1)" checked>
                                <span>混合模式</span>
                                <i class="mdi mdi-information-outline"data-toggle="tooltip" data-placement="top" title="" data-original-title="线索池提供：主动领取和主动分配功能"></i>
                            </label>
                            <label class="lyear-radio radio-inline radio-primary m-t-10">
                                <input type="radio" value="1" name="allocation" style="margin-right: 6px;" onchange="changeWay(2)">
                                <span>被动分配</span>
                                <i class="mdi mdi-information-outline"data-toggle="tooltip" data-placement="top" title="" data-original-title="只提供系统自动分配功能，不提供主动分配和主动领取功能"></i>
                            </label>
                        </div>
                    </div>
                </div>
            </div>
            <div class="well form-well">
                <h2>规则设置</h2>
                <div class="one">
                    <h3>领取规则</h3>
                    <div class="row">
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                            <label class="control-label">最多领取数量</label>
                            <div class="form-content">
                                <input type="text" id="maximumNumber" class="form-control" placeholder="请输入最多领取数量" oninput="value=value.replace(/[^\d]/g,'')" maxlength="10">
                            </div>
                        </div>
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                            <label class="control-label">同一线索不能连续领取间隔</label>
                            <div class="form-content input-group">
                                <input type="text" id="timeInterval" class="form-control" placeholder="请输入领取时间间隔" oninput="value=value.replace(/[^\d]/g,'')" maxlength="10">
                                <span class="input-group-addon">h</span>
                            </div>
                        </div>
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                            <label class="control-label">任意线索不能连续领取间隔</label>
                            <div class="form-content input-group">
                                <input type="text" id="continueTimeInterval" class="form-control" placeholder="请输入领取时间间隔" oninput="value=value.replace(/[^\d]/g,'')" maxlength="10">
                                <span class="input-group-addon">s</span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="two">
                    <h3>退回规则</h3>
                    <div class="row">
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                            <label class="control-label label-required">无跟进退回时间间隔</label>
                            <div class="form-content input-group">
                                <input type="text" id="returnInterval" class="form-control" placeholder="请输入无跟进退回时间间隔" oninput="value=value.replace(/[^\d]/g,'')" maxlength="10">
                                <span class="input-group-addon">h</span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="three" id="fenpeiguize">
                    <h3>分配规则</h3>
                    <div class="row">
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                            <label class="control-label">分配时间间隔</label>
                            <div class="form-content input-group">
                                <input type="text" id="allocationTimeInterval" class="form-control" placeholder="请输入分配时间间隔" oninput="value=value.replace(/[^\d]/g,'')">
                                <span class="input-group-addon">h</span>
                            </div>
                        </div>
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                            <label class="control-label">分配数量</label>
                            <div class="form-content">
                                <input type="text" id="assignedQuantity" class="form-control" placeholder="请输入分配数量" oninput="value=value.replace(/[^\d]/g,'')">
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <label class="control-label">被动分配人员名单</label>
                            <div class="form-content">
                                <div class="row" id="selectContain">
                                    <div class="col-xs-4">
                                        <!-- 部门 -->
                                        <select  id="companyList" class="form-control" title="请选择部门" data-live-search="true"></select>
                                    </div>
                                    <div class="col-xs-4">
                                        <!-- 人员 -->
                                        <select id="personList" class="form-control col-sm-2" title="请选择人员" data-live-search="true" ></select>
                                    </div>
                                    <div class="col-xs-2">
                                        <button type="button" class="btn btn-success" onclick="addList()">添加</button>
                                    </div>
                                    <div id="nameList" class="col-sm-8"><ul class="well"></ul></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-actions">
                <button class="btn btn-primary btn-label" type="button" onclick="addPublicCluePool()"><label><i class="mdi mdi-check"></i></label>提交</button>
                <button class="btn btn-default" type="button" onclick="formReset();">重置</button>
            </div>
        </form>
    </div>
</div>

<!-- 模态框 -->
<div class="modal fade" tabindex="-1" role="dialog" id="peopleModal">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-body" style="min-height: 200px;">
                <!-- start -->
                <h4 style="line-height: 40px;font-size: 14px;font-weight: bold;">被动分配人员名单</h4>
                <div id="selectContain" style="display: flex; flex-direction: column;margin-bottom: 20px;">
                    <div id="contentB1" style="display: flex;min-width: 140px;margin-bottom: 10px;">
                        <!-- 部门 -->
                        <select  id="deptSelect1" style="width: 300px;margin-right: 30px;" class="form-control" data-live-search="true"></select>
                        <!-- 人员 -->
                        <select id="personSelect1" style="width: 300px;margin-right: 30px;" class="form-control col-sm-2" data-live-search="true" ></select>
                        <!-- 添加按钮 -->
                        <button type="button" class="btn btn-primary" id="add-check-person" onclick="addCheckPerson()">
                            <i class="mdi mdi-plus-circle-outline" aria-hidden="true"></i>增加人员
                        </button>
                    </div>
                    <!-- 删除 -->

                </div>
                <div style="width: 100%;display: flex;justify-content: center;">
                    <div class="btn btn-primary" style="margin-right: 20px;" onclick="confirmModel()">确定</div>
                    <div class="btn btn-default" onclick="cancleModel()">取消</div>
                </div>
                <!-- end -->
            </div>
        </div>
    </div>
</div>
</div>
</body>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="/js/main.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
<script src="/js/jquery-confirm/jquery-confirm.min.js"></script>
<script src="/js/crm/common/city.js"></script>
<script src="/js/crm/common/common.js"></script>
<script type="text/javascript" src="/js/bootstrap-tagsinput/bootstrap-tagsinput.js"></script>
<!--时间选择插件-->
<script src="/js/bootstrap-datetimepicker/moment.min.js"></script>
<script src="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="/js/bootstrap-datetimepicker/locale/zh-cn.js"></script>
<!--表单验证插件-->
<script src="/js/bootstrap-validator.js"></script>
<!--日期选择插件-->
<script src="/js/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
<script src="/js/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<!-- 多选框下拉 -->
<script type="text/javascript" src="/js/bootstrap-multiselect.js"></script>
<script type="text/javascript" src="/js/bootstrap-select.js"></script>
<script type="text/javascript" src="/js/bootstrap.lyear.dropdowntree.min.js"></script>
<!--<script src="/js/verSelect.2.0.js"></script>-->
<script src="/js/crm/cluePoolManager/addCluePool.js"></script>
</html>